<template>
  <div class="app1">
    <title1 tit="我的评价"></title1>
    <van-tabs v-model="active" line-width="50%" class="can1">
      <van-tab title="待评价">
        <!-- <div class="div1">
          <img src="https://img01.yzcdn.cn/vant/ipad.jpeg" alt="" />
          <ul class="ul1">
            <li>预约时间</li>
            <li>东城区一按外3号</li>
            <li>1室一厅</li>
            <li>￥198</li>
            <li class="li3">购买时间 2017/12/3</li>
          </ul>
          <div class="jiage">去评价</div> -->
        <!-- </div> -->
        <div class="card" v-for="item in shoplist" :key="item.id">
          <div class="left">
            <div class="top">
              <img src="../../../../assets/shopcartimg/1.jpg" alt="" />
            </div>
            <div class="bottom">买家已付款</div>
          </div>
          <div class="right">
            <div>{{ item.name }}</div>
            <div>{{ item.dis1 }}</div>
            <div>{{ item.dis2 }}</div>
            <div class="money">
              {{ item.price }}
            </div>
            <div class="data">购买时间 ： 2017/12/13</div>
            <div class="button">
              <div class="jiage">去评价</div>
            </div>
          </div>
        </div>
      </van-tab>
      <van-tab title="已评价"
        ><div class="div1">
          <img src="https://img01.yzcdn.cn/vant/ipad.jpeg" alt="" />

          <ul class="ul1">
            <li>预约时间</li>
            <li>东城区一按外3号</li>
            <li>1室一厅</li>
            <li>￥198</li>
            <li class="li3">购买时间 2017/12/3</li>
          </ul>
          <div class="jiage">去评价</div>
        </div></van-tab
      >
    </van-tabs>
  </div>
</template>

<script>
import title1 from "../../../../components/tit.vue";
import { getlist } from "../../../../api/index";
export default {
  data() {
    return {
      active: 2,
      shoplist: [],
    };
  },
  components: {
    title1,
  },
  methods: {
    goback() {
      this.$router.replace({ name: "yuekan" });
    },
    async init() {
      let obj = await getlist({
        userId: this.$store.state.userId,
      });
      console.log(obj.data.data);
      this.shoplist = obj.data.data;
    },
  },
  created() {
    this.init();
  },
};
</script>

<style lang="less" scoped>
.app1 {
  width: 100%;
  height: 100%;
  background-color: #ebebeb;

  .div1 {
    background-color: #fff;
    height: 250px;
    margin: 20px;
    border-radius: 5px;
    img {
      float: left;
      width: 290px;
      height: 196px;
      margin: 20px;
    }
    .ul1 {
      float: left;
      margin: 20px;

      li {
        margin-top: 10px;
        font-size: 11px;
      }
      .li3 {
        font-size: 11px;
      }
    }
    .jiage {
      float: right;
      color: #ff5555;
      margin-top: 200px;
      width: 100px;
      height: 32px;
      border: 1px solid #618698;
      text-align: center;
      border-radius: 8px;
      font-size: 11px;
    }
  }
  .card {
    width: 710px;
    height: 250px;
    margin: auto;
    box-sizing: border-box;
    padding: 20px;
    background-color: white;
    margin-top: 20px;
    border-radius: 10px;
    .left {
      float: left;
      .top {
        img {
          width: 220px;
          height: 175px;
        }
      }
      .bottom {
        font-size: 15px;
      }
    }
    .right {
      float: left;
      width: 430px;
      margin-left: 20px;
      font-size: 18px;
      .data {
        margin-top: 20px;
      }
      .money {
        color: red;
        margin-bottom: -10px;
      }
      .button {
        width: 100%;
        div {
          margin-top: 10px;
          float: right;
          width: 106px;
          text-align: center;
          line-height: 28px;
          height: 28px;
          margin-left: 15px;
          font-size: 20px;
          border: 1px solid #000;
        }
      }
    }
  }
}
</style>
